package com.ljp.chat.client;

import com.dtflys.forest.annotation.DataFile;
import com.dtflys.forest.annotation.Post;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

@Component
public interface UploadFile {

    /**
     * Upload file map.
     * 文件上传
     *
     * @param file the file
     * @return the map
     */
    @Post(
            url = "http://121.41.46.175:1210/ljp/file",
            headers = {
                    "Content-Type: multipart/form-data"
            }
    )
    Map<String, Object> uploadFile(@DataFile("file") MultipartFile file);
}
